v<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/css/layui.css}">
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <title>超市订单后台管理系统</title>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div th:replace="common::header"></div>
    <div th:replace="common::middle"></div>
    <div class="layui-body">
        <form class="layui-form" th:action="@{/Workshop/updateById/}+${workshop.getId()}" method="post" style="margin-top: 20px; margin-right: 20px">
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px">编号</label>
                <div class="layui-input-block">
                    <input type="text" name="id" required  lay-verify="required"  th:value="${workshop.getId()}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px">车间名</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required  lay-verify="required"  th:value="${workshop.getName()}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px">运行状态</label>
                <div class="layui-input-block">
                    <input type="text" name="state" required  lay-verify="required"  th:value="${workshop.getState()}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px">设备数量</label>
                <div class="layui-input-block">
                    <input type="text" name="equipment_num" required  lay-verify="required" th:value="${workshop.getEquipment_num()}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px">管理员</label>
                <div class="layui-input-block">
                    <input type="text" name="manager" required  lay-verify="required" th:value="${workshop.getManager()}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px">联系方式</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" required  lay-verify="required" th:value="${workshop.getPhone()}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item" style="text-align: center">
                <div class="layui-input-block">
                    <button class="layui-btn" type="submit">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>

    </div>



</div>

</body>
<script th:src="@{/js/layui.js}"></script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });

    });
</script>
</html>
